/**
 * 
 */
package org.cuatrovientos.es;

import java.util.Vector;



/**
 * @author Beatriz
 *@Sprint
 */
public class Sprint{
	/**
	 * @string name
	 */
private String name;
	/**
	 * @circuit
	 */
private Circuit circu;

private Vector<Car>participants;
/**
 * 
 */
 public Sprint(String name, Circuit circu){
	 this.name=name;
	 this.circu=circu;
	 participants = new Vector<Car>();
 }
 
public void insertCar(Car threeCar) {
	participants.addElement(threeCar);
		
	}

	public Car run() {
		int mercedes;
		int audi=0;
		int citroen;
		
		int man=participants.size();
	for	(int i=0 ;i <man;i++){
		if(participants.get(i).getName()==null){
			man--;
			participants.remove(i);
			
		}
		
	
		}
		
		return null;
	}
	
private int timer(Car v){
	int seconds=0;
	int km=0;
	while(km < circu.getPositions()){
		seconds++;
		km = v.move();
	}
	return seconds;
		
	
}
}

	
